#!/usr/bin/env python

import random

n = random.randint(1, 20)

print "%d" % (n)
for i in range(n):
    k = random.randint(1, 10)
    print "%d" % (k),
    for j in range(k):
        o = random.randint(2, 10)
        print " %d" % (o),
    print
